package com.hsp.homework_;

//B
//C
//D
public class Homework03 {
    public static void func() {
        try {
            //2.抛出异常
            throw new RuntimeException();
        } finally {
            //3.打印B
            System.out.println("B");
        }
    }
    public static void main(String[] args) {
        try {
            func();//1,进入func()
            //4.接收到了异常，不执行打印 A的语句
            System.out.println("A");
        } catch (Exception e) {
            //4.接收到异常打印C
            System.out.println("C");
        }
        //5.打印D
        System.out.println("D");
    }
}
